const BookModule = require("../database/book");
const networkUtils = require("../utils/network");

// 获取图书
function getBook(req, res, next) {
  networkUtils.getData(req, res, next, BookModule, {
    fuzzy: ["book_name", "publisher", "tag"],
  });
}
// 热门数据20条
function getHotData(req, res, next) {
  networkUtils.getData(req, res, next, BookModule, {
    mode: "multiple",
    pageSize: 20,
  });
}

module.exports = {
  getBook,
  getHotData,
};
